<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
   <button id="btn">点我</button>
<script>
    var btn = document.getElementById("btn");

    btn.onclick = function (event) {
        var e = event || window.event;
        console.log(e.target);
    };

    btn.onmouseover = function (event) {
        var e = event || window.event;
        console.log(e.target);
    }
</script>
</body>
</html>